package com.example.springbootjpasqllogdemo.domain;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统用户档案表
 *
 * @author Lv
 * @date 2022/11/4
 */
@Data
@Entity
@DynamicUpdate()
@DynamicInsert()
@SelectBeforeUpdate()
@Table(name = "user_record")
public class UserRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 用户名
     */
    @Column(name = "name", nullable = false)
    private String name;

    /**
     * 手机号
     */
    @Column(name = "phone", nullable = false)
    private String phone;

    /**
     * 邮箱
     */
    @Column(name = "email")
    private String email;

    /**
     * 专业
     */
    @Column(name = "profession")
    private String profession;

    /**
     * 年龄
     */
    @Column(name = "age")
    private String age;

    /**
     * 性别 , 1: 男, 2: 女
     */
    @Column(name = "gender")
    private String gender;

    /**
     * 状态
     */
    @Column(name = "status")
    private String status;

    /**
     * 创建时间
     */
    @Column(name = "createtime")
    private Date createtime;

}
